package com.itheima.health.controller;

import com.itheima.health.entity.Result;
import com.itheima.health.service.SetMealService;
import org.apache.dubbo.config.annotation.Reference;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

/**

 */
@RestController
public class SetmealController {

    @Reference
    private SetMealService setMealService;

    @GetMapping("/setmeal/findAllSetmeal")
    public Result findAllSetmeal(){
        return new Result(setMealService.list());
    }

    @GetMapping("/setmeal/findSetMealDetail/{id}")
    public Result findSetMealDetail(@PathVariable("id") int id){
        return new Result(setMealService.findSetMealDetail(id));
    }
}
